<?php 
header("content-type:text/html;charset=utf-8"); 
ini_set("magic_quotes_runtime",0); 

//require_once 'class.smtp.php';
require 'class.phpmailer.php'; 

//$name = $_POST["name"];
$contact = $_POST["contact"];
$content = $_POST["content"];

try { 
    $mail = new PHPMailer(true); 
    $mail->IsSMTP(); 
    $mail->CharSet='UTF-8'; //设置邮件的字符编码，这很重要，不然中文乱码 
    $mail->SMTPAuth = true; //开启认证 
    $mail->Port = 25; 
    $mail->Host = "smtp.163.com"; 
    $mail->Username = "18330108360@163.com"; 
    $mail->Password = "k1220125"; 
    //$mail->IsSendmail(); //如果没有sendmail组件就注释掉，否则出现“Could not execute: /var/qmail/bin/sendmail ”的错误提示 
    $mail->AddReplyTo("18330108360@163.com","mckee");//回复地址 
    $mail->From = "18330108360@163.com"; 
    $mail->FromName = "www.italk.com"; 
    $to = "1476676335@qq.com"; 
    $mail->AddAddress($to);
    $mail->AddAddress("hadasuifeng@163.com");
    $mail->AddAddress("18330106577@163.com");
    
    $mail->Subject = "意见反馈"; 
    $mail->Body = "<p>联系方式：". $contact ."</p>" . "<p>建议：". $content . "</p>"; 
    // $mail->Body = "<h1>phpmail演示</h1>这是php点点通（<font color=red>www.phpddt.com</font>）对phpmailer的测试内容"; 
    $mail->AltBody = "To view the message, please use an HTML compatible email viewer!"; //当邮件不支持html时备用显示，可以省略 
    $mail->WordWrap = 80; // 设置每行字符串的长度 
    //$mail->AddAttachment("f:/test.png"); //可以添加附件 
    $mail->IsHTML(true); 
    $mail->Send(); 
    // echo '邮件已发送'; 
    echo '1';
} catch (phpmailerException $e) { 
     //echo "邮件发送失败：".$e->errorMessage(); 
    echo '0';
} 
?>